<?php

class Adept_Template_Exception extends Adept_Exception 
{
    protected $location;
    
    public function __construct($message, $params = array(), $location = null)
    {
        $this->location = $location;
        if ($location != null) {
            $params['Template File'] = $location->getFileName();
            $params['Template Line'] = $location->getLineNumber();
        }
        parent::__construct($message, 0, $params);    	
    }
    
    public function getLocation() 
    {
        return $this->location;
    }
    
}